/**
  ************************************* Copyright ******************************
  * FileName   : systick.c
  * Version    : v1.0
  * Author     : yychao
  * Date       : 2023-01-30
  * Description:
  * Function List:
  	1. ....
  	   <version>:
  <modify staff>:
  		  <data>:
   <description>:
  	2. ...
  ******************************************************************************
 */

#include "systick.h"

#if 1
void SysTick_Delay_Us( __IO uint32_t us)
{
    uint32_t i;
    SysTick_Config(SystemCoreClock/1000000);
    for (i=0; i < us; i++) {
        while ( !((SysTick->CTRL)&(1<<16)) );
    }
    SysTick->CTRL &=~ SysTick_CTRL_ENABLE_Msk;
}

void SysTick_Delay_Ms( __IO uint32_t ms)
{
    uint32_t i;
    SysTick_Config(SystemCoreClock/1000);
    for (i=0; i < ms; i++) {
        while ( !((SysTick->CTRL)&(1<<16)) );
    }
    SysTick->CTRL &=~ SysTick_CTRL_ENABLE_Msk;
}
#endif
